package misscl.online.slh_gym.controller;


import misscl.online.slh_gym.entity.Missing;
import misscl.online.slh_gym.service.MissingService;
import misscl.online.slh_gym.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.xml.ws.Action;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author theo
 * @since 2022/11/28 22:03
 */
@RestController
@RequestMapping("/missing")
public class MissingController {

    @Autowired
    private MissingService missingService;

    @GetMapping("/list")
    public AjaxResult list(){
        List<Missing> list = missingService.list();
        return AjaxResult.ok("首页失物列表获取成功").data("missingList",list);
    }

}
